import pandas as df
import pandas as pd

df = pd.read_excel(r'C:\Users\Administrator\Desktop/111.xlsx')
print(df)


# 写文件到excel
a1 = {'name': 'xiaohong', 'age': 20}
a2 = {'name': 'xiaoliu', 'age': 21}
a3 = {'name': 'xiaobai', 'age': 22}
l = [a1,a2,a3]
print(l)
# 需要将列表变成dateframe格式
df1 = pd.DataFrame(l)
print(df1)
# 使用pandas的函数to_excle()，index系列
df1.to_excel('111.xlsx',index = False)


#1
from docx import Document
doc = Document('2023年国务院政府工作报告.docx')
p = doc.paragraphs
print(p)
print(len(p))
for i in p:
    print(i.text)